home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Education / T-Z / trigHype.cpt / trigHype™ / card_5791.txt < prev    next >
Encoding:
Text File  |  1990-08-12  |  4.0 KB  |  209 lines

  1. -- card: 5791 from stack: in
  2. -- bmap block id: 6102
  3. -- flags: 4000
  4. -- background id: 4114
  5. -- name: A,a known
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   set numberFormat to <0.000000>
  9.  
  10.   --Calculate Angle B
  11.   get bkgnd field "angle C"
  12.   put it into mem1
  13.   get card field "angle A"
  14.   put it into mem2
  15.   get mem1-mem2
  16.   put it into mem3
  17.   put it into card field "angle B"
  18.  
  19.   --Calculate Tan A
  20.   get tan(mem2*(pi/180))
  21.   put it into mem4
  22.   put it into card field "tan A"
  23.  
  24.   --Calculate Sin A
  25.   get sin(mem2*(pi/180))
  26.   put it into mem5
  27.   put it into card field "sin A"
  28.  
  29.   --Calculate Cos A
  30.   get mem5/mem4
  31.   put it into mem6
  32.   put it into card field "cos A"
  33.  
  34.   --Calculate Side b
  35.   get card field "side a"
  36.   put it into mem7
  37.   get mem7*(mem6/mem5)
  38.   put it into mem8
  39.   put it into card field "side b"
  40.  
  41.   --Calculate Side c
  42.   get sqrt(mem7^2+mem8^2)
  43.   put it into card field "side c"
  44.  
  45.   --Calculate Area
  46.   get card field "side a"*card field "side b"/2
  47.   put it into bkgnd field "Area"
  48.  
  49.   --Calculate Perimeter
  50.   get card field "side a"+card field "side b"+card field "side c"
  51.   put it into bkgnd field "Perimeter"
  52. end mouseUp
  53.  
  54.  
  55. -- part 1 (field)
  56. -- low flags: 01
  57. -- high flags: 0004
  58. -- rect: left=112 top=263 right=282 bottom=240
  59. -- title width / last selected line: 0
  60. -- icon id / first selected line: 0 / 0
  61. -- text alignment: 1
  62. -- font id: 3
  63. -- text size: 12
  64. -- style flags: 256
  65. -- line height: 16
  66. -- part name: side b
  67.  
  68.  
  69. -- part 2 (field)
  70. -- low flags: 01
  71. -- high flags: 0004
  72. -- rect: left=51 top=135 right=154 bottom=184
  73. -- title width / last selected line: 0
  74. -- icon id / first selected line: 0 / 0
  75. -- text alignment: 1
  76. -- font id: 3
  77. -- text size: 12
  78. -- style flags: 256
  79. -- line height: 16
  80. -- part name: side c
  81.  
  82.  
  83. -- part 3 (field)
  84. -- low flags: 01
  85. -- high flags: 0004
  86. -- rect: left=245 top=85 right=104 bottom=373
  87. -- title width / last selected line: 0
  88. -- icon id / first selected line: 0 / 0
  89. -- text alignment: 1
  90. -- font id: 3
  91. -- text size: 12
  92. -- style flags: 256
  93. -- line height: 16
  94. -- part name: angle B
  95.  
  96.  
  97. -- part 4 (field)
  98. -- low flags: 00
  99. -- high flags: 0002
  100. -- rect: left=347 top=146 right=163 bottom=475
  101. -- title width / last selected line: 0
  102. -- icon id / first selected line: 0 / 0
  103. -- text alignment: 1
  104. -- font id: 3
  105. -- text size: 12
  106. -- style flags: 0
  107. -- line height: 16
  108. -- part name: side a
  109.  
  110.  
  111. -- part 5 (field)
  112. -- low flags: 00
  113. -- high flags: 0002
  114. -- rect: left=22 top=217 right=234 bottom=150
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 1
  118. -- font id: 3
  119. -- text size: 12
  120. -- style flags: 0
  121. -- line height: 16
  122. -- part name: angle A
  123.  
  124.  
  125. -- part 6 (field)
  126. -- low flags: 01
  127. -- high flags: 0001
  128. -- rect: left=387 top=208 right=220 bottom=447
  129. -- title width / last selected line: 0
  130. -- icon id / first selected line: 0 / 0
  131. -- text alignment: 0
  132. -- font id: 3
  133. -- text size: 9
  134. -- style flags: 0
  135. -- line height: 12
  136. -- part name: tan A
  137.  
  138.  
  139. -- part 7 (field)
  140. -- low flags: 01
  141. -- high flags: 0001
  142. -- rect: left=387 top=224 right=236 bottom=447
  143. -- title width / last selected line: 0
  144. -- icon id / first selected line: 0 / 0
  145. -- text alignment: 0
  146. -- font id: 3
  147. -- text size: 9
  148. -- style flags: 0
  149. -- line height: 12
  150. -- part name: sin A
  151.  
  152.  
  153. -- part 8 (field)
  154. -- low flags: 01
  155. -- high flags: 0001
  156. -- rect: left=387 top=240 right=252 bottom=447
  157. -- title width / last selected line: 0
  158. -- icon id / first selected line: 0 / 0
  159. -- text alignment: 0
  160. -- font id: 3
  161. -- text size: 9
  162. -- style flags: 0
  163. -- line height: 12
  164. -- part name: cos A
  165.  
  166.  
  167. -- part contents for card part 4
  168. ----- text -----
  169. 1
  170.  
  171. -- part contents for card part 5
  172. ----- text -----
  173. 45
  174.  
  175. -- part contents for background part 3
  176. ----- text -----
  177. 90
  178.  
  179. -- part contents for card part 3
  180. ----- text -----
  181. 45.000000
  182.  
  183. -- part contents for card part 6
  184. ----- text -----
  185. 1.000000
  186.  
  187. -- part contents for card part 7
  188. ----- text -----
  189. 0.707107
  190.  
  191. -- part contents for card part 8
  192. ----- text -----
  193. 0.707107
  194.  
  195. -- part contents for card part 1
  196. ----- text -----
  197. 1.000000
  198.  
  199. -- part contents for card part 2
  200. ----- text -----
  201. 1.414214
  202.  
  203. -- part contents for background part 5
  204. ----- text -----
  205. 0.500000
  206.  
  207. -- part contents for background part 9
  208. ----- text -----
  209. 3.414214